
#pragma once

#include "config.hpp"

#include "atr/core/types.hpp"

using namespace atr;
using namespace atr::core;

template <typename T>
class CapacityTest : public ::testing::Test 
{};

TYPED_TEST_CASE_P(CapacityTest);

TYPED_TEST_P(CapacityTest, Empty_True)
{
    EXPECT_SAME( _true, TYPE_PARAM<>::empty );
}

TYPED_TEST_P(CapacityTest, Empty_False)
{
    using E1 = TYPE_PARAM<int>::empty;
    using E2 = TYPE_PARAM<int, long>::empty;
    using E3 = TYPE_PARAM<int, int, int>::empty;

    EXPECT_SAME( _false, E1 );
    EXPECT_SAME( _false, E2 );
    EXPECT_SAME( _false, E3 );
}

TYPED_TEST_P(CapacityTest, Size_Empty)
{
    EXPECT_SAME( _size_t<0>, TYPE_PARAM<>::size );
}

TYPED_TEST_P(CapacityTest, Size_NonEmpty)
{
    using S1 = TYPE_PARAM<int>::size;
    using S2 = TYPE_PARAM<int, long>::size;
    using S3 = TYPE_PARAM<int, int, int>::size;

    EXPECT_SAME( _size_t<1>, S1 );
    EXPECT_SAME( _size_t<2>, S2 );
    EXPECT_SAME( _size_t<3>, S3 );
}

REGISTER_TYPED_TEST_CASE_P(CapacityTest, Empty_True, Empty_False,
                                         Size_Empty, Size_NonEmpty);
